import { hasAuth } from '@/router/utils'
import type { Directive } from 'vue'

const auth: Directive = {
  mounted(el, binding) {
    const { value } = binding
    console.log('%c [ value ]-7', 'font-size:13px; background:pink; color:#bf2c9f;', value)
    if (value) {
      !hasAuth(value) && el.parentNode?.removeChild(el)
    }
  }
}
export default auth
